<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="/layui/css/layui.css">
    <script src="/layui/layui.js"></script>
    <script src="/lib/jquery-3.4.1/jquery-3.4.1.min.js"></script>

    <script>
        function changetab(title){
            var url="";
            switch (title) {
                case 'consulttable':
                    url="./consult/consultList.html";
                    break;

                case 'callbacktable':
                    url="./callback/callbackList.html";
                    break;
                case 'eventtable':
                    url="./event/eventList.html";
                    break;


                case 'usertable':
                    url="./user/table.html";
                    break;

                case 'Bar':
                    url="./echarts/Bar.html";
                    break;
                case 'studentlist':
                    url="./students/studentList.html";
                    break;
                case 'equipmenttable':
                    url="./equipments/equipmentList.html";
                    break;
                case 'entertainmenttable':
                    url="./entertainment/entertainmentList.html";
                    break;

                case 'sitetable':
                    url="./site/siteList.html";
                    break;


                case 'discharge':
                    url="./discharge/dischargeList.html";
                    break;

                case 'occupancy':
                    url="./occupancy/occupancyList.html";
                    break;
                case 'hospitalized':
                    url="./hospitalized/hospitalizedList.html";
                    break;
                    

                case 'breakfasttable':
                    url="./breakfast/breakfastList.html";
                    break;

                case 'cases':
                    url="./cases/casesList.html";
                    break;
                case 'drugstorage':
                    url="./drugstorage/drugList.html";
                    break;

                    
                case 'lunchtable':
                    url="./lunch/lunchList.html";
                    break;

                case 'dinnertable':
                    url="./dinner/dinnerList.html";
                    break;
                case 'purchasetable':
                    url="./purchase/purchaseList.html";
                    break;
                case 'stockFoot':
                    url="./food/foodList.html";
                    break;
                case 'stockEquipment':
                    url="./equipment/equipmentList.html";
                    break;

                case 'department':
                    url="./staffArchives/departmentList.html";
                    break;


                case 'room':
                    url="./room/roomlist.html";
                    break;

                case 'dorm':
                    url="./dorm/dormlist.html";
                    break;


                case 'staff':
                    url="./staffArchives/staffList.html";
                    break;
                case 'carer':
                    url="./carerArchives/carerList.html";
                    break;
                case 'oldman':
                    url="./oldManArchives/oldManList.html";
                break;
                    case 'Bar':
                    url="./echarts/Bar.html";
                break;
                case 'aidList':
                    url="./facility/aidList.html";
                break;
                case 'basicList':
                    url="./facility/basicList.html";
                    break;
                case 'faultList':
                    url="./facility/faultList.html";
                    break;
                case 'income':
                    url="./huicl/income.html";
                    break;
                case 'expenditure':
                    url="./huicl/expenditure.html";
                    break;
                case 'assets':
                    url="./huicl/assets.html";
                    break;
                

                default:
                    break;
            }

            $("#main").attr("src",url);
        }
    </script>
    
    <!-- <script>
        function changetab(title){
            var url="";
            switch (title) {
                case 'department':
                    url="./staffArchives/departmentList.html";
                    break;

                case 'staff':
                    url="./staffArchives/staffList.html";
                    break;
                case 'carer':
                    url="./carerArchives/carerList.html";
                    break;
                case 'oldman':
                    url="./oldManArchives/oldManList.html";
                    break;

                default:
                    break;
            }

            $("#main").attr("src",url);
        }
    </script> -->

 


    

</head>
<body>
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo layui-hide-xs layui-bg-black">世纪养老管理系统</div>
        <!-- 头部区域（可配合layui 已有的水平导航） --> -->
        <!-- <ul class="layui-nav layui-layout-left">
            移动端显示
             <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-header-event="menuLeft">
                <i class="layui-icon layui-icon-spread-left"></i>
            </li>

            <li class="layui-nav-item layui-hide-xs"><a href="">nav 1</a></li>
            <li class="layui-nav-item layui-hide-xs"><a href="">nav 2</a></li>
            <li class="layui-nav-item layui-hide-xs"><a href="">nav 3</a></li>
            <li class="layui-nav-item">
                <a href="javascript:;">nav groups</a>
                <dl class="layui-nav-child">
                    <dd><a href="">menu 11</a></dd>
                    <dd><a href="">menu 22</a></dd>
                    <dd><a href="">menu 33</a></dd>
                </dl>
            </li>
        </ul> -->
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="">首页</a>
              </li>
              <li class="layui-nav-item">
                <a href="">关于养老院</span></a>
              </li>
            <li class="layui-nav-item layui-hide layui-show-md-inline-block">
                <a href="javascript:;">
                    <img  src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F01592c5f8ea34a11013f3110f5dd82.jpg%401280w_1l_2o_100sh.jpg&refer=http%3A%2F%2Fimg.zcool.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1661584993&t=6717901296dc7177247e4c19ac368369" class="layui-nav-img">
                    <span>欢迎：</span>
                    <span id="currentUser" ></span>
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="index.html">退出</a></dd>

                </dl>
            </li>
            <li class="layui-nav-item" lay-header-event="menuRight" lay-unselect>
                <a href="javascript:;">
                    <i class="layui-icon layui-icon-more-vertical"></i>
                </a>
            </li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test">


                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">客户管理</a>
                    <dl class="layui-nav-child">
                        <dd >
                            <a  class="" href="javascript:;">接待管理</a>
                                <dl class="layui-nav-child"><a href="javascript:;" onclick="changetab('consulttable')">咨询接待管理</a></dl>
	                            <dl class="layui-nav-child"><a href="javascript:;" onclick="changetab('callbacktable')">回访记录明细</a></dl>
	                            <dl class="layui-nav-child"><a href="javascript:;" onclick="changetab('eventtable')">特别接待事件记录</a></dl>
                        </dd>

                        <dd >
                            <a  class="" href="javascript:;">档案管理</a>
                            <dl class="layui-nav-child"><a href="javascript:;" onclick="changetab('department')">部门管理</a></dl>
                            <dl class="layui-nav-child"><a href="javascript:;" onclick="changetab('staff')">员工档案管理</a></dl>
                            <dl class="layui-nav-child"><a href="javascript:;" onclick="changetab('carer')">护工档案管理</a></dl>
                            <dl class="layui-nav-child"><a href="javascript:;" onclick="changetab('oldman')">老人档案管理</a></dl>
                        </dd>

                        <dd >
                            <a  class="" href="javascript:;">出入院管理</a>
                            <dl class="layui-nav-child"><a href="javascript:;" onclick="changetab('discharge')">出院管理</a></dl>
                            <dl class="layui-nav-child"><a href="javascript:;" onclick="changetab('hospitalized')">住院管理</a></dl>
                            <dl class="layui-nav-child"><a href="javascript:;" onclick="changetab('occupancy')">入院管理</a></dl>
                        </dd>
                      
                        
                    </dl>
                </li>

                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">医疗管理</a>
                            <dl class="layui-nav-child"><a href="javascript:;" onclick="changetab('cases')">病例信息</a></dl>
                            <dl class="layui-nav-child"><a href="javascript:;" onclick="changetab('drugstorage')">药品库存</a></dl>
                </li>

                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">生活管理</a>
                    <dl class="layui-nav-child">
                        <dd >
                            <a  class="" href="javascript:;">居住管理</a>
                            <dl class="layui-nav-child"><a href="javascript:;" onclick="changetab('room')">宿舍管理</a></dl>
                            <dl class="layui-nav-child"><a href="javascript:;" onclick="changetab('dorm')">宿舍人员管理</a></dl>
                        </dd>

                        <dd >
                            <a  class="" href="javascript:;">餐食管理</a>
                            <dl class="layui-nav-child"><a href="javascript:;" onclick="changetab('breakfasttable')">早餐管理</a></dl>
                            <dl class="layui-nav-child"><a href="javascript:;" onclick="changetab('lunchtable')">午餐管理</a></dl>
                            <dl class="layui-nav-child"><a href="javascript:;" onclick="changetab('dinnertable')">晚餐管理</a></dl>
                            <dl class="layui-nav-child"><a href="javascript:;" onclick="changetab('purchasetable')">采购管理</a></dl>
                        </dd>

                        
                    </dl>
                </li>


                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">库存管理</a>                                                               
                            <dl class="layui-nav-child"><a href="javascript:;" onclick="changetab('stockFoot')">食材库存</a></dl>
                            <dl class="layui-nav-child"><a href="javascript:;" onclick="changetab('stockEquipment')">设备库存</a></dl>                                                                 
                </li>


                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">财务管理</a>                           
                            <dl class="layui-nav-child"><a href="javascript:;" onclick="changetab('income')">资金收入</a></dl>
                            <dl class="layui-nav-child"><a href="javascript:;" onclick="changetab('expenditure')">资金支出</a></dl>
                            <dl class="layui-nav-child"><a href="javascript:;" onclick="changetab('assets')">财务报表</a></dl>                                            
                    </dl>
                </li>


                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">综合管理</a>
                    <dl class="layui-nav-child">

                        <dd>
                            <a  class="" href="javascript:;">文娱管理</a>
                            <dl class="layui-nav-child"><a href="javascript:;" onclick="changetab('equipmenttable')">文娱器材管理</a></dl>
                            <dl class="layui-nav-child"><a href="javascript:;" onclick="changetab('entertainmenttable')">文娱项目管理</a></dl>
                            <dl class="layui-nav-child"><a href="javascript:;" onclick="changetab('sitetable')">文娱场地管理</a></dl> 
                            </dd>
                       

                        <dd >
                            <a  class="" href="javascript:;">医疗辅助设备管理</a>                           
                                <dl class="layui-nav-child"><a href="javascript:;" onclick="changetab('aidList')">急救设备</a></dl>
                                <dl class="layui-nav-child"><a href="javascript:;" onclick="changetab('basicList')">基本设备</a></dl>
                                <dl class="layui-nav-child"><a href="javascript:;" onclick="changetab('faultList')">故障设备</a></dl>                                
                        </dd>
                        
                    </dl>
                </li>
                      
            </ul>
        </div>
    </div>

    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div style="padding: 15px;">
            <iframe id="main" src="welcome.html" frameborder="0" style="width: 100%; height: 800px;"></iframe>
        </div>
    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        版权所有@java2207
    </div>
</div>

<script>
    
    //JS
    layui.use(['element', 'layer', 'util'], function(){
        var element = layui.element
            ,layer = layui.layer
            ,util = layui.util
            ,$ = layui.$;

        var token = JSON.parse(localStorage.getItem("token"));
        $.ajaxSetup({
            // 发送cookie
            xhrFields: {
                withCredentials: true
            },
            // headers: {
            //     "token": token
            // }
        })

        // 从本地存储 把当前用户数据 取出来  并转为  js 对象
        var data = JSON.parse(localStorage.getItem("currentUser"));
        // console.log(data);
        // alert(data.username);


        $("#currentUser").html(data.username);

        //头部事件
        util.event('lay-header-event', {
            //左侧菜单事件
            menuLeft: function(othis){
                layer.msg('展开左侧菜单的操作', {icon: 0});
            }
            ,menuRight: function(){
                layer.open({
                    type: 1
                    ,content: '<div style="padding: 15px;">处理右侧面板的操作</div>'
                    ,area: ['260px', '100%']
                    ,offset: 'rt' //右上角
                    ,anim: 5
                    ,shadeClose: true
                });
            }
        });

    });
</script>
</body>
</html>